package exercise;

public class ExtendsExercise02 {
    public static void main(String[] args) {
        L l = new L();
        //H类 hahahE有 L有 L无
    }
}

class H {
    public H() {
        System.out.println("我是H类");
    }
}

class E extends H{
    public E() {
        System.out.println("我是E类无参构造器");
    }
    public E(String name) {
        System.out.println(name + "我是E类有参构造器");
    }
}

class L extends E {
    public L() {
        this("hello");
        System.out.println("我是L类无参构造器");
    }
    public L(String name) {
        super("hahah");
        System.out.println("我是L类有参构造器");
    }
}
